package com.bl.student.dao.repository;

import com.bl.student.common.enums.DetailType;
import com.bl.student.dao.model.ItemTagEntity;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * Created by yujingyi on 2018/3/21.
 */
public interface ItemTagRepository extends PagingAndSortingRepository<ItemTagEntity, String> {
    List<ItemTagEntity> findByItemIdAndType(String itemId, DetailType type);

    List<ItemTagEntity> findByTagIdAndType(String tagId, DetailType type);

    void deleteByItemIdAndType(String itemId, DetailType type);
}
